// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ConfigTraining.java

package com.wyzz.hr.action;

import java.util.Map;

import com.wyzz.hr.base.BaseAction;
import com.wyzz.hr.util.DatabaseSysConfigManager;
import com.wyzz.hr.util.SysConfigManager;

public class ConfigTraining extends BaseAction {

	public ConfigTraining() {
	}

	public String showTrainingConfig() throws Exception {
		if (!hasAuth(961, new int[0])) {
			addErrorInfo("\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u65E0\u6743\u8FDB\u5165\u8BE5\u9875\u9762\uFF01");
			return "noauth";
		} else {
			Map dbMap = dbManager.getProperties();
			sys_train_create_level = (String) dbMap
					.get("sys.train.create.level");
			return "success";
		}
	}

	public String updateTrainingConfig() throws Exception {
		if (!hasAuth(961, new int[0])) {
			addErrorInfo("\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u65E0\u6743\u8FDB\u5165\u8BE5\u9875\u9762\uFF01");
			return "noauth";
		} else {
			dbManager.setProperty("sys.train.create.level",
					sys_train_create_level);
			return "success";
		}
	}

	public String getSys_train_create_level() {
		return sys_train_create_level;
	}

	public void setSys_train_create_level(String sys_train_create_level) {
		this.sys_train_create_level = sys_train_create_level;
	}

	private static final long serialVersionUID = 1L;
	private String sys_train_create_level;
	private static SysConfigManager dbManager = DatabaseSysConfigManager
			.getInstance();

}
